
#include <string.h>
#include "script_expression.h"
#include "script.h"
#include "script_func.h"
#include "script_include.h"
#include "script_var.h"
#include "script_debug.h"

int main(int argc, char **argv)
{

	//script_t *script = script_script_create();
	//exp_node_t *exp = expression_decode("1+1",script);
	//exp_node_t *result = expression_calc(exp);
	//exp_node_print(result);


	script_t *load = script_load(argv[1]);
	//show_script(load);
	run_script(load);
	//show_script(load);

#if 0
	exp_node_t *result = script_run_code(load,"num = 100");
	exp_node_destroy(result);
	result = script_run_code(load,"Print(num)");
	exp_node_destroy(result);

	script_change_var_value(load,"num","{}");
	script_change_var_value(load,"num.name","num");
	result = script_run_code(load,"Print(num)");
	exp_node_destroy(result);
#endif



	//show_script_memory();
	script_destroy(load);
	script_include_uninit();
	script_default_func_uninit();
	show_script_memory();

	//while(1);
	printf("done\n");

	return 0;
}
